home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / term / vltj5867.lha / VLT / rexx / Remote.vlt < prev    next >
Text File  |  1994-03-27  |  1KB  |  51 lines

  1. /** Remote.vlt
  2. *
  3. *  Send a command to a remote VLT
  4. *
  5. **/
  6. /*
  7. *   Add libraries if necessary
  8. */
  9. if show("l", "rexxarplib.library") = 0 then do
  10.    check = addlib('rexxsupport.library', 0, -30, 0)
  11.    check = addlib('rexxarplib.library',  0, -30, 0)
  12. end
  13. /*
  14. *   The following sequence determines both VLT's screen and port name
  15. */
  16. vltport = address()
  17. cols = ScreenCols(vltport)
  18. if cols == -1 then vltscreen = ""
  19. else               vltscreen = vltport
  20.  
  21. str = ""
  22. do i = 1
  23. /*
  24. *   First ask for a command to be executed by the remote VLT
  25. */
  26.    str = request(50, 50, ,
  27.          "Enter a command for the remote to execute:",str,,"Cancel", vltscreen)
  28.  
  29.    if str = "" then exit(0);
  30. /*
  31. *   The initial escape sequence...
  32. */
  33.    string = '1b'x||"[?91h"
  34. /*
  35. *   ...and the password (AMIGA in this case)...
  36. */
  37.    string = string ||"AMIGA~"
  38. /*
  39. *   ...and the command...
  40. */
  41.    string = string ||str
  42. /*
  43. *   ...and the final escape sequence, make up the full string.
  44. */
  45.    string = string ||'1b'x||"[?91l"
  46. /*
  47. *   Send this string without further translation to the remote VLT.
  48. */
  49.    'send raw ['string']'
  50. end
  51.